package com.tvunetworks.center.user.mapper;

import com.tvunetworks.center.user.model.RoleFeature;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @author Etan Yang
 * @data: 2021/4/7 15:22
 * @program: tvucc-aggregator
 * @description:
 */

public interface RoleFeatureMapper extends Mapper<RoleFeature> {

    /**
     * 根据roleId和featureIds批量删除Role Feature
     * @param roleId roleId
     * @param featureIds featureIds
     * @return int
     */
    int batchDeleteByRoleIdAndFeatureIds(@Param("roleId") String roleId, @Param("featureIds") List<String> featureIds);

    /**
     * 根据roleId获取RoleFeature集合
     * @param roleId roleId
     * @return List
     */
    List<RoleFeature> getByRoleId(String roleId);

    /**
     * 根据roleId删除RoleFeature
     * @param roleId roleId
     * @return int
     */
    int deleteByRoleId(@Param("roleId") String roleId);
}
